open Castling;;

module CharPG = ParserGenerator (CharToken);;
open CharPG;;

let rec conflict = lazy !! (
	element 'A' >> b >> element 'C'
) and b = lazy !! (
	one_of ~name:"b" [
		"b1", epsilon;
		"b2", element 'C'
	]
);;

(* debug := true; *)
runtime_debug := true;;
begin try
	generate conflict;
	flush stderr;
	raise (Failure "NOT CONFLICTED!!")
with ParserGeneratingError _ ->
	prerr_string "CONFLICTED, OK.\n"
end;;
